package de.schlinke_marius.database;

import android.database.Cursor;
import android.database.sqlite.SQLiteException;

public interface GalleryPicturesTbl {
	
	public static final String TABLE_NAME = "GALLERYPICUTRES";
	
	public static final String COLUMN_ID = "_ID";
	
	public static final String COLUMN_FK_EXAMPLES = "FK_EXAMPLES";
	
	public static final String COLUMN_PICTUREURL= "PICTUREURL";
	
	public static final String COLUMN_DESCRIPTION = "DESCRIPTION";
	
	public static final String[] COLUMNS = { 
		COLUMN_ID,
		COLUMN_FK_EXAMPLES,
		COLUMN_PICTUREURL,
		COLUMN_DESCRIPTION,
	};	
	
	public static final String CREATE_TABLE_GALLERYPICTURES  = " CREATE TABLE  IF NOT EXISTS " + TABLE_NAME+  " ( " 
	+ COLUMN_ID + " INTEGER PRIMARY KEY  AUTOINCREMENT  NOT NULL, " 		
	+ COLUMN_FK_EXAMPLES + " INTEGER, "
	+ COLUMN_PICTUREURL  + " text, "
	+ COLUMN_DESCRIPTION + " text, FOREIGN KEY (FK_EXAMPLES) REFERENCES EXAMPLES (_ID) );";
	
	public static final String INSERT_INTO_GALLERYPICTURES  = "INSERT INTO " + TABLE_NAME + "(" + COLUMN_ID + "," + COLUMN_FK_EXAMPLES + "," + COLUMN_PICTUREURL + "," + COLUMN_DESCRIPTION + ") values (?,?,?,?)";

	public long insertIntoGalleryPictures(int id, int fkExamples, String pictureurl, String description) throws SQLiteException;	
	
	public Cursor getGalleryPictures(int id) throws SQLiteException;
}
